# -*- mode: make-gnumakefile; coding: utf-8 -*-

SHELL=/bin/bash

all:

install:
	install -d $(DESTDIR)/usr/lib/hanzitrainer
	install -d $(DESTDIR)/usr/bin
	install -d $(DESTDIR)/usr/share/hanzitrainer

	install -m 0644 ht.py $(DESTDIR)/usr/lib/hanzitrainer
	install -m 0644 hanzitrainer.ui $(DESTDIR)/usr/share/hanzitrainer
	install -m 0755 hztrainer $(DESTDIR)/usr/bin

package: clean
	dpkg-buildpackage -uc -us -rfakeroot -b -tc
	dh_clean
	mv ../*_all.deb .
	rm -f ../hanzitrainer_*.changes
	-quilt pop -a

upload: package
	./upload.sh

.PHONY: clean
clean:
	find . -name "*~" -delete
	$(RM) *.pyc -rf *.deb
	-quilt pop -a

